<script>
  init({
    title: 'Issue #220',
    desc: 'Hide state column(<a href="https://github.com/wenzhixin/bootstrap-table/issues/220" target="_blank">#220</a>).',
    links: ['bootstrap-table.min.css'],
    scripts: ['bootstrap-table.min.js']
  })
</script>

<div class="toolbar">
  <button id="button" class="btn btn-secondary">Hide state column</button>
</div>
<table
  id="table"
  data-toggle="table"
  data-toolbar=".toolbar"
  data-show-columns="true"
  data-url="json/data1.json">
  <thead>
    <tr>
      <th data-field="state" data-checkbox="true"></th>
      <th data-field="id">ID</th>
      <th data-field="name">Item Name</th>
      <th data-field="price">Item Price</th>
    </tr>
  </thead>
</table>

<script>
  var $table = $('#table')

  function mounted() {
    $('#button').click(function () {
      $table.bootstrapTable('hideColumn', 'state')
    })
  }
</script>
